package structures.lists;

public class ListNode {
    
    private Object object;
    private ListNode next;
    private ListNode previous;
    
    public ListNode() {
        this.object = null;
        this.next = null;
        this.previous = null;
    }
    
    public ListNode(Object obj) {
        this.object = obj;
        this.next = null;
        this.previous = null;
    }
    
    public void setObject(Object obj) {
        this.object = obj;
    }
    
    public Object getObject() {
        return this.object;
    }
    
    public void setPrevious(ListNode node) {
        this.previous = node;
    }
    
    public void setNext(ListNode node) {
        this.next = node;
    }
    
    public ListNode next() {
        return this.next;
    }
    
    public ListNode previous() {
        return this.previous;
    }
}
